<!DOCTYPE html>
<html lang="zh">
	<head>
		<meta charset="UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<title>文件预览插件</title>
		<link rel="stylesheet" href="../previewOffice/common/css/main.css">
		<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
		<link rel="stylesheet" href="../previewOffice/common/css/audio.css" />
		<link rel="stylesheet" href="../previewOffice/luckysheet/css/pluginsCss.css" />
		<link rel="stylesheet" href="../previewOffice/luckysheet/css/plugins.css" />
		<link rel="stylesheet" href="../previewOffice/luckysheet/css/luckysheet.css" />
		<link rel="stylesheet" href="../previewOffice/luckysheet/css/iconfont.css" />
		<link rel="stylesheet" href="../previewOffice/pptxjs/css/pptxjs.css" />
		<link rel="stylesheet" href="../previewOffice/pptxjs/css/nv.d3.min.css" />
		<link rel="stylesheet" href="../previewOffice/viewer.css" />
	</head>
	<body>
		<div id="el-app">
			<div id="container">
			</div>
		</div>

		<!-- built files will be auto injected -->

		<script type="text/javascript" src="../previewOffice/jquery-2.0.3.min.js"></script>
		<!-- <script src="/assets/vue/vue.js"></script> -->
		<!-- <script src="/assets/elementui/lib/index.js"></script> -->
		<script src="https://unpkg.com/vue@2.6/dist/vue.min.js"></script>
		<script src="https://unpkg.com/element-ui/lib/index.js"></script>
		<script type="text/javascript" src="../previewOffice/jPreview.js"></script>
		<script>
			var app = new Vue({
				delimiters: ['${', '}'],
				el: '#el-app',
				data() {
					return {
						loading: true,
					};
				},
				created() {
					const loading = this.$loading({
						lock: true,
						text: '资源加载中...',
						spinner: 'el-icon-loading',
						background: 'rgba(0, 0, 0, 0.9)'
					});
					this.$nextTick(function() {
						jPreview.preview({
							container: "container", // 容器id
							staticPath: "../previewOffice", // 静态资源路径
							url: "http://hzyc.fld2018.com/1.pdf", // 预览资源路径，没有的话获取url中scr参数
							ext: "pdf", // 资源后缀，如果url中没有的话，必须传入后缀名，否则无法识别文件类型
							name: "", // 资源名称
							watermarkTxt: "", // 水印文字
							watermarkSize: "", // 水印文字大小
							priority: 2, // 优先级 1：使用插件预览 2：使用office在线预览，
							oburl: "", // 可自动设置在线设置office线上预览地址，不需要的话可以不传
						});
						loading.close();
					})
				}
			})
		</script>
	</body>
</html>